import request from '@/utils/request'

export default {

    getList(searchMap) {

        return request({
            url: "/banner/list",
            method: 'POST',
            data: searchMap
        })
    },
    findById(id) {

        return request({
            url: "/banner/" + id,
            method: "get"
        })

    },
    save(pojo) {
        return request({
            url: "/banner/add",
            method: 'post',
            data: pojo
        })
    },
    update(id, pojo) {
        if (id === null || id === '') {
            return this.save(pojo);
        }
        return request({
            url: "/banner/update",
            method: 'put',
            data: pojo
        })

    },
    delete(id) {
        return request({
            url: "/banner/" + id,
            method: "delete"
        })

    }

}